<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>

<?php $_product = $this->getProduct() ?>

<?php if($_product->isSaleable()): ?>
    <div class="add-to-cart">
        <?php if(!$_product->isGrouped()): ?>
          <div class="choose_q">
<a class="add_q" title="鍑�" onclick="QtyChange(-1);return false"></a>
<span class="input_q">
<input type="text"  name="qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" title="<?php echo $this->__('Qty') ?>"class="quantity">
</span>
<a class="cut_q" title="鍔�" onclick="QtyChange(1);return false"></a>
<span class="q_q">Quanlity</span>
<div class="clear"></div>
</div>
        <?php endif; ?>
       <div class="img_link_con">
          <a class="img_link" href="javascript:void(0)" onclick="productAddToCartForm.submit(this)">Add to Basket</a>
          <?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?>
            <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Compare') ?></a>
          <?php endif; ?>
      </div>    
    <?php echo $this->getChildHtml('', true, true) ?>
    </div>

<?php endif; ?>
<script type="text/javascript">
//<![CDATA[
             function QtyChange(qty){
                 var value = parseInt($('qty').value) + parseInt(qty);
                 $('qty').value = value>0?value:1;
             }
//]]>
</script>

